<template>
    <div><h2>引用ts类型</h2></div>
    <div>查看控制台</div>
  </template>
  
  <script lang="ts" setup>
  import type { ShopInfoSec } from "@/components/type/demo";
  import { NAME, add, demo } from "@/components/type/demo";
  
  
  // console.log(ShopInfoSec);
  
  const a: ShopInfoSec = { name: "", num: 0, price: 0, dept: "" };
  console.log(a);
  
  const b: ShopInfoSec = { dept: "aha" };
  console.log(b);
  
  console.log(NAME);
  
  const to = add(1, 2);
  console.log(to);
  
  const c = demo<ShopInfoSec>(b);
  console.log(c);
  </script>
  
  <style scoped></style>
  